<script>
function marks(id){
	var answer = confirm("Bạn có chắc chắn muốn xóa không?")
    if (answer){
        window.location = "<?php echo $this->baseUrl(); ?>/admin/abouts/delete/id/"+id;
    }
    
    return false;
    
}
</script>
    <header>
      <h3 class="tabs_involved">Quản lý tin giới thiệu</h3>
      
<div class="functionBtnEvent">
        <ul>
          <li><a href="/admin/abouts/add">Thêm mới</a></li>
        </ul>
</div>
    </header>
    <div class="module_content">
        <table cellspacing="0" class="tablesorter tablesorterBorder">
        <thead>
        <tr>
                <th width="15">STT</th>
                <th width="360">Title</th>
                <th>Hình ảnh</th>
                <th>Loại</th>
                <th>Điều khiển</th>		
                
        </tr>
        </thead>
        <?php foreach($this->data as $key=>$value):
        $class = null;
            if ($key % 2 == 0) {
                $class = ' class="altrow"';
            }
        ?> 
        <tr <?php echo $class;?>>
                <td><?php echo $key + 1;?></td>
                <td><?php echo $value['title']; ?></td>
                <td><img src="<?php echo $this->baseUrl()."/".$value['image']; ?>" alt="Image" width="100" height="80"/></th>
                <td><?php echo $value['type']; ?></td>
                <td><a href="/admin/abouts/edit/id/<?php echo $value['id'];?>">Edit</a> | <a href="#" onclick="marks('<?php echo $value['id'];?>')">Delete</a></td>		
                
        </tr>    
        <?php endforeach; ?>
    
        </table>
    </div>
	
 
	<div class="paging">
	<?php echo $this->paginationControl($this->data, 'Sliding', 'pagination.phtml'); ?>
	</div>
